package cn.bone.vertx.demo01;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.streams.Pump;


/**
 * Created by MD-01 on 2017/2/9.
 */
public class Server extends AbstractVerticle{

    public static void main(String[] args){
        Runner.run(Server.class);
    }

    @Override
    public void start() throws Exception {
        vertx.createNetServer().connectHandler(sock ->{
            Pump.pump(sock,sock).start();
        }).listen(1000);
        System.out.println("Echo server is now listening");
    }
}
